#ifndef __GRAPH_H__
#define __GRAPH_H__

#include <list>
#include <vector>
#include <string>
#include <iostream>
using namespace std;

#include "Vertex.h"
#include "myExceptions.h"

class Graph
{
public:
	Graph(int NumOfVertex);
	~Graph();

	void	addVertex(string plabel);
	void	addEdge(string pStartVertex, string pEndVertex);
	Vertex*	getVertex(string pLabel);
	Vertex*	getVertex(int pPosition);
	bool	getEdge(string pStartVertex, string pEndVertex);	
	
	void	dfs(string pStartVertex, string pEndVertex);

	void	printAdjMatr();
	void	printStack();

	typedef vector< Vertex > vertexList;
	typedef vector< Vertex >::iterator vertexListIterator;

private:
	Graph(const Graph& pGraph);
	Graph& operator=(const Graph& pGraph);

	int searchVertexByLabel(string pLabel);
	int getAdjUnvisitedVertex(int);


	int MAX_VERTS;
	vertexList mVertexList;			
	int** adjMat;			
	list<int> theStack;
};

#endif __GRAPH_H__